<?php
namespace app\admin\controller;
use think\Db;
use lib\Curl;
class Member extends Base{
    public function member_list(){
        $keyword=input('get.keyword');
        if (!empty(input('get.fromtime'))) {
            $fromtime=strtotime(input('get.fromtime'));
        }else{
            $fromtime=0;
        }
        if (!empty(input('get.totime'))) {
            $totime=strtotime(input('get.totime'))+86400;
        }else{
            $totime=time();
        }
        $map = [
            ['time', '>', $fromtime],
            ['time', '<', $totime]
        ];
        $list=Db::name('users')->where($map)->where('nickname','like',"%{$keyword}%")->order('id desc')->paginate(10);
        $lists=Db::name('users')->where($map)->where('nickname','like',"%{$keyword}%")->count();
       	
        $this->assign('keyword',input('get.keyword'));
        $this->assign('fromtime',input('get.fromtime'));
        $this->assign('totime',input('get.totime'));
        $this->assign('list',$list);
        $this->assign('lists',$lists);
        return $this->fetch();
    }
    public function member_detail(){
        if(request()->isGet()){
        }elseif(request()->isPost()){
        }
    }
}
